package application.controller
{
	import application.model.GatewayProxy;
	import application.model.vo.Post;
	
	import org.puremvc.interfaces.ICommand;
	import org.puremvc.interfaces.INotification;
	import org.puremvc.patterns.command.SimpleCommand;
	
	public class SubmitPostCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification):void
		{
			var gateway:GatewayProxy = facade.retrieveProxy( GatewayProxy.NAME ) as GatewayProxy;
			
			gateway.insertPost(notification.getBody() as Post);
		}
	}
}